package com.example.test3.serviceImpl;

import com.example.test3.bean.UserBean;
import com.example.test3.dao.UserDao;
import com.example.test3.service.UserServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServerImpl implements UserServer {


    @Autowired
    private UserDao userDao;

    @Override
    public UserBean logIn(String name,String password){
        return userDao.getInfo(name,password);
    }

    @Override
    public List<UserBean> selectAllUser() {
        return userDao.selectAll();
    }

    @Override
    public int deleteUser(int id) {
        return userDao.deleteUser(id);
    }

}
